package com.ruoyi.common.constant;

import com.ruoyi.common.core.domain.ResultCode;

public enum ErrorCode implements ResultCode {

    USERNAME_PASSWORD_IS_NULL(100000,"用户名或密码不能为空"),
    USERNAME_PASSWORD_IS_ERROR(100001,"用户名或密码错误"),
    USER_ID_IS_USER(100002,"用户ID已注册，请重新设置用户ID"),
    DELETE_USER_FAIL(100003,"删除失败，请稍后再试"),
    PASSWORD_CONFIRM_IS_ERROR(100004,"两次输入密码不一致"),
    ADD_GROUP_FAIL(100005,"新增群组失败，请稍后再试"),
    UPDATE_GROUP_FAIL(100006,"修改群组失败，请稍后再试"),
    DELETE_GROUP_FAIL(100007,"解散群组失败，请稍后再试"),
    DELETE_GROUP_USER_FAIL(100008,"删除群成员失败，请稍后再试"),
    GROUP_OWNER_NO_DELETE(100009,"群主角色不可删除")
    ;
    //操作代码
    int code;
    //提示信息
    String message;
    private ErrorCode(int code, String message){

        this.code = code;
        this.message = message;
    }
    public int code() {
        return this.code;
    }

    public String message() {
        return this.message;
    }

    @Override
    public String toString() {
        return "CommonCode{" +
                ", code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}
